package com.shunan.miaosha.redis;

import com.alibaba.fastjson.JSON;

public class Key2String {

	public static <T> String key2String(T key){
		return JSON.toJSONString(key);
	}
	
	public static <T> T string2Key(String key, Class<T> clazz){		
		return JSON.parseObject(key, clazz);
	}
}
